package com.good.domain.service.impl;

import com.good.domain.entity.AdminRoleModule;
import com.good.domain.mapper.AdminRoleModuleMapper;
import com.good.domain.models.AdminModuleBean;
import com.good.domain.service.IAdminRoleModuleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 大钊
 * @since 2022-09-04
 */
@Service
public class AdminRoleModuleServiceImpl extends ServiceImpl<AdminRoleModuleMapper, AdminRoleModule> implements IAdminRoleModuleService {
    @Autowired
    private AdminRoleModuleMapper adminRoleModuleMapper;
    public List<AdminModuleBean> getModleByRole(String role){
        String[] split = role.split(",");
        List<String> strings = Arrays.asList(split);
        return  adminRoleModuleMapper.getModleByRole(strings);
    }
}
